package com.sum.tea.ui

import android.os.Bundle
import android.view.View
import android.widget.Toast
import androidx.annotation.StringRes
import com.sum.tea.base.BaseMvvmFragment
import com.sum.common.bean.CommonResult
import com.sum.tea.R
import com.sum.tea.databinding.ActivityDestructionBinding
import com.sum.tea.viewmodel.DestructionViewModel

class DestructionFragment : BaseMvvmFragment<ActivityDestructionBinding, DestructionViewModel>() {
    override fun initView(view: View, savedInstanceState: Bundle?) {
        initClickListeners()
    }

    private fun initClickListeners() {
        mBinding.btnDestruction.setOnClickListener { handleKillTag() }
    }

    private fun handleKillTag() {
        mBinding.etDespwd.text.toString().let { password ->
            mViewModel.killTag(password)
        }
    }
}
